<html>
<head><meta charset="utf-8"><title>Support multiple cargo configuration · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20multiple.20cargo.20configuration.html">Support multiple cargo configuration</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="232620976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20multiple%20cargo%20configuration/near/232620976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20multiple.20cargo.20configuration.html#232620976">(Mar 31 2021 at 16:23)</a>:</h4>
<p><span class="user-mention" data-user-id="120054">@Jon Gjengset</span> has a suggestion in <a href="https://github.com/rust-lang/cargo/issues/9306">https://github.com/rust-lang/cargo/issues/9306</a> and <span class="user-mention" data-user-id="397321">@Blake Oren</span>  has offered to start on implementation. What is not yet clear is does the Team Want it. So Thought I would ask here. (I looked but did not find the older thread about this topic.)</p>



<a name="232621883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20multiple%20cargo%20configuration/near/232621883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20multiple.20cargo.20configuration.html#232621883">(Mar 31 2021 at 16:29)</a>:</h4>
<p>This would have been useful for <a href="https://github.com/bevyengine/bevy/pull/1387">https://github.com/bevyengine/bevy/pull/1387</a>. Basically that PR used to add a <code>.cargo/config.toml</code> for a <code>cargo ci</code> alias, but this would make applying the fast build config harder as for example <code>git rebase</code> requires all files to be unmodified when starting.</p>



<a name="232629011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20multiple%20cargo%20configuration/near/232629011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Blake Oren <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20multiple.20cargo.20configuration.html#232629011">(Mar 31 2021 at 17:09)</a>:</h4>
<p>If you're using nightly, there is <a href="https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#config-include">config-include</a> that might do the trick. The multiple configuration files are more for having a split <code>config.toml</code> that is merged into one based on filename priority rather than selecting different configurations.</p>



<a name="232634440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20multiple%20cargo%20configuration/near/232634440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jon Gjengset <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20multiple.20cargo.20configuration.html#232634440">(Mar 31 2021 at 17:42)</a>:</h4>
<p>I wonder if <code>cargo-include</code> should even still exist if there's support for split configuration files? Is having _both_ worthwhile, or just unnecessary complexity?</p>



<a name="232639178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Support%20multiple%20cargo%20configuration/near/232639178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Blake Oren <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Support.20multiple.20cargo.20configuration.html#232639178">(Mar 31 2021 at 18:14)</a>:</h4>
<p>I think <code>cargo-include</code> is still worthwhile for CI applications that want to build with different configurations like bevy that are outside the scope of features. Combining the two could also allow prioritizing a split config outside of it's default ordering, but I'm not sure that would be used often.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>